import request from '@/sheep/request';

const UserArticleApi = {
  // 查询文章详情
  queryArticleDetail: (data) => {
    return request({
      url: '/relation/article/queryArticleDetail',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
  // 添加或修改文章
  addOrUpdateArticle: (data) => {
    return request({
      url: '/relation/article/addOrUpdateArticle',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },
  // 删除文章
  deleteArticle: (data) => {
    return request({
      url: '/relation/article/deleteArticle',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '删除成功'
      },
    });
  },
  // 查询文章列表
  queryArticleList: (data) => {
    return request({
      url: '/relation/article/queryArticleList',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
  // 查询文章基础信息列表
  queryArticleBaseInfoList: (data) => {
    return request({
      url: '/relation/article/queryArticleBaseInfoList',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
};

export default UserArticleApi;
